<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Water Fall</title>
    <link href="index.css" rel="stylesheet" type="text/css" />
    <script src="library.js"></script>
    <script src="language/zh-cn.js"></script> 
    <script src="webCollectionXHR.js" type="text/javascript"></script>
    <script src="webCollectionBase.js" type="text/javascript"></script>
    <script src="eventutil.js" type="text/javascript"></script>    
</head>
 <script>
     //+-------------------------send and get data from server--------------------
     function sendAndGetData(isAsy, url, func) {
         try {
             xmlRequest.open("GET", url, isAsy);
             xmlRequest.onreadystatechange = function () {
                 if (xmlRequest.readyState == 4 && xmlRequest.status == 200) {
                     func(xmlRequest.responseText);
                 }
             };
             xmlRequest.send();
         }
         catch (e) {
             return false;
         }
     }

     var i = window.location.href.indexOf("webcollection");
     g.domainDirectory = window.location.href.substring(0, i + 13);
     //g.domainSuf = g.domainDirectory.match(/\/\/\w+/);
     g.domainSuf = g.domainSuf.substring(2, g.domainSuf.length);
     var getDataURL = g.domainDirectory + "/SendDataToClient.aspx?freshParam=" + (new Date).getTime();
     var xmlRequest = SimpleXhrFactory.CreateXhrObject();
     var g_AllData; // editting

     sendAndGetData(false, getDataURL, function (resTxt) {
         g.dataWebTable["main"] = eval('(' + resTxt + ')');
     });
</script>
<body>
<div id="outer" onselectstart="return false;" style="width:100%;">
<table style="width:100%;">
<tr style="font-size:small;"><td style="width:20%;"></td>
<td>
<table><tr><td><a id="signonID" class="linkOne" href = "javascript:void(0)" style="color:Blue;" onclick = "g.lightOn = new LightOn($('light'));">sign on</a></td>
<td><div id="userInfor" ></div></td></tr></table>
</td>
<td></td>
</tr>
</table>
<div id="fade" class="black_overlay"></div>
<div id="divCenter">
<script>
    $("signonID").innerHTML = lan["signOn"];
    function tabChange(obj, id, num) {
        document.form1.myselectvalue.value = num;
        var arrayli = obj.parentNode.getElementsByTagName("li"); //��ȡli����
        for (i = 1; i < 3; i++) {
            if (obj == arrayli[i]) {
                arrayli[i].className = "cli";
            }
            else {
                arrayli[i].className = "";
            }
        }
        setContent();
        getsrc();
    }
</script>
<div id="idFourHead" style="width:100%;">
<table id="idFourHeadTable">
<tr>
<td></td>
<td>
<div id="outerSearch" style="width:100%;">
<div class="tabbox">
  <div class="tabmenu">
   <ul >
	<li style="width:4%; background-color: #fff">&nbsp;</li>
    <li onclick="tabChange(this,'tabcontent','0')"  class="cli" >网页</li>
    <li onclick="tabChange(this,'tabcontent','1')">图片</li>
	<li style="width:85%; background-color: #fff;border-right:#fff 1px solid;">&nbsp;</li>
   </ul>
   
  </div>
  <div id="tabcontent">
  <form target="_blank" action="" name="form1" method="get">
	<iframe width="100%" scrolling="no" height="70" frameborder="0" src="" id="google_sdo_frame" name="google_sdo_frame"></iframe>
	<p>
   	<input type="radio" name="engine" value="baidu_web" checked="checked" onclick ="javascript:Switch('baidu')"/><label for="id_radio_baidu_web">�ٶ�</label>
	<input type="radio" name="engine" value="google_web" onclick ="javascript:Switch('google')"/><label for="id_radio_google_web">�ȸ�</label>
	</p>
	<input name="myselectvalue" type="hidden" value="0"/>
	<input name="mypage" type="hidden" value='baidu'/>
	<input name="Content" id="Content" value='' type="hidden"/>
  </form>
  </div>
 </div>
 <script>
     function Switch(page) {
         document.form1.mypage.value = page;
         setContent();
         getsrc();
     }
     function getsrc() {
         var page = document.form1.mypage.value;
         var ty = document.form1.myselectvalue.value;
         document.getElementById("google_sdo_frame").src = page + '.html?ty=' + ty;
     }
     function setContent() {
         var Content = frames["google_sdo_frame"].document.getElementById("sea").value
         document.form1.Content.value = Content;
     }
     getsrc();
</script>
</div>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td  style="background-color:#F7F7F7;" align="left"><input id="webKeywordID" type="text" size="7" onkeydown="triggerSearchLocal(event)" /><input type="button" size="4" value="search" onclick="searchLocal()" /></td>
<td></td>
</tr>
<tr>
<td style="width:20%;"></td>
<td id="tdA"><div style="z-index:1;" id="idA"></div></td>
<td></td>
</tr>
</table>
</div>
<div align="center">
<div id="idThree"></div>
</div>
<script type="text/javascript" language="javascript">
    g.page = new Page()
    g.page.s(g.dataWebTable["main"]); 
    g.page.c();
    g.page.r();
    if (g.user == undefined) {
        g.user = new User(lib.cookie.get("username"));
    }
    g.user.setUserInfo();

    var tmpURL = g.domainDirectory + "/weblazy.js?freshParam=" + (new Date).getTime();
    sendAndGetData(true, tmpURL, function (resTxt) {
        eval(resTxt);
    });
    lib.debug.log(navigator.userAgent);
</script>
</div>
</div>
<table style="visibility:hidden">
<tr>
<td><input type="button" value="Test" onclick="testFunc()" /><textarea rows="18" cols="14" id="history"></textarea></td><td></td>
</tr>
</table>
</body>
<!--<script>
    myWebTools.webTools.addItem("selectWebs", (new WebTool("selectWebsID", "selectWebs")));
    myWebTools.webTools.initialize();
</script>-->
</html>